import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-account',
  templateUrl: './account.component.html',
  styleUrls: ['./account.component.scss']
})
export class ProductAccountComponent implements OnInit {
  public accountList = [];
  
  public listCount = 10;

  public operate = "edit";

  constructor() { }

  ngOnInit() {
    this.accountList = [];
    for (var i = 1; i <= this.listCount; i++) {
      var ramdomT = ['中国银行', '光大银行','招商银行','工商银行','农业银行','中国银行', 
      '光大银行','招商银行','工商银行','农业银行','中国银行', '光大银行','招商银行'];
      var types = ['养老金','年金','社保'];
      var ramdom = Math.round(Math.random() * 2);
      this.accountList.push({
        code: '111111' + i,
        name: '产品名称' + i,
        fundDate: "2017-06-01",
        type: types[ramdom],
        money: '10000' + i,
        contractname: '合同名称'+i,
        bank: ramdomT[i],
        trusteeshipinfo: '托管人内容'+i,
        info: '内容'+i,
        probability: '1'+i+'%',
        accrued_condition: '计提条件'+i,
        pay_condition: '支付条件'+i,
        pay: '支付'+i
      });
    }
  }

}